from django.http.response import HttpResponse

__author__ = 'Morgen Matvey, Smolnikov Rodion'

import hhapi.auth as hhruauth
import hhapi.api as hhapi
from django.shortcuts import redirect
from django.template import RequestContext, loader

def index(request):
    redirect_uri = '/auth/start'
    return redirect(redirect_uri)

def start(request):
    return redirect(hhruauth.generate_redirect_uri())

def get_vacancy_description(request):
    return HttpResponse(hhapi.get_vacancy_info(request.GET['id']))